// Game.h

#pragma once

#include "SFML\Graphics.hpp"
#include <iostream>
#include <stdlib.h>
#include <time.h>

#include "DisplayManager.h"
#include "SpriteManager.h"
#include "ImgLoader.h"
#include "AgentManager.h"
#include "BunnyAgent.h"
#include "WolfAgent.h"
#include "BearAgent.h"
#include "Node.h"
#include "AStar.h"
#include "WorldObjectManager.h"
#include "InputHandler.h"
#include "Player.h"
#include "GUIButton.h"

using namespace std;

class Game
{
	public:
		Game();
		~Game();

		void Update();
		void Initialize();
		void Cleanup();
		void CreateGrid();
		
	private:
		DisplayManager* m_xDisplayManager;
		SpriteManager* m_xSpriteManager;
		ImgLoader* m_xImgLoader;
		AgentManager* m_xAgentManager;
		WorldObjectManager* m_xWorldObjectManager;
		InputHandler* m_xInputHandler;

		sf::RenderWindow* m_xWindow;
		sf::Event m_xEvent;

		// Delta time
		float m_fDelta;
		sf::Clock m_xClock;

		// Font for text in the game
		sf::Font m_xFont;

		vector<vector<Node*>> Grid;
		bool m_bCanPlace;
		sf::Sprite* m_xSprite;
		AStar aStar;

		// Used for key input
		float m_fKeyboardDelay;

		//Player
		Player* m_xPlayer;

		// Buttons
		GUIButton* m_xWolfButton;
		GUIButton* m_xBunnyButton;
		GUIButton* m_xBearButton;
};

